package engine.tip.tipItem
{
	import engine.GameData;
	import engine.data.ModelLocator;
	import engine.data.ObjectData;
	import engine.data.RoleVo;
	
	import newx.com.config.StaticIni;
	
	/**
	 *一般tips 
	 * @author yanghr
	 * 
	 */	
	public class NormalItem extends BaseTipItem
	{
		private var _model:ModelLocator;
		public function NormalItem(dataObject:ObjectData=null,data:Object=null)
		{
			_model = ModelLocator.getInstance();
			super(dataObject,data);
		}
		override public function getMainStr():String
		{
			return getName()+getChangeLine()
				+ 	getAppendEffect()
				+	getType()
				+   getNeedLevel()
				+	getALine()
				+	getDescribe()
				+	getPrice();
				+	getCommend();
		}
		/**
		 *得到附加效果 
		 * @return 
		 * 
		 */		
		public function getAppendEffect():String
		{
			var tips:String= getSingleProperty(0)
			if(tips)
				return	getPropertyColor(tips)+getChangeLine();
			return ""
		}
		
		/**
		 *得到需要等级 
		 * @return 
		 * 
		 */
		public function getNeedLevel():String
		{
			var str:String = "";
			var level:int = _model.scene.Role.getPlayerLevel();
			var needLevel:int = _data["NeedLevel"];
			if(level < needLevel)
			{
				str = StaticIni.getSwfLangStrVar("UIString_1000684",[needLevel.toString()]);
			}
			else
			{
				str = StaticIni.getSwfLangStrVar("UIString_1000683",[needLevel.toString()]);
			}
			if(needLevel > 0)
				return str +getChangeLine();
			
			return "";
		}
		
		/**
		 *类型 
		 * @return 
		 * 
		 */		
		public function getType():String
		{
			var str:String=""
			var type:int=_data["ItemType"];
			str	=	StaticIni.getSwfLangStr("ItemType_"+type);
			return str+getChangeLine()
		}
		/**
		 * 得到提示
		 * @return 
		 * 
		 */		
		public function getCommend():String
		{
			return ""
		}
	}
}